<template>
  <div class="dashboard-container">
    <div class="dashboard-text">物质管理信息系统</div>
    <div class="dashboard-text">欢迎您: {{ name }}</div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: "Dashboard",
  computed: {
    ...mapGetters(['name']),
  },
  data() {
    return {
    };
  },
  methods: {
    goLogin() {
      if(this.name == '') {
        this.$router.push({ path: '/login' })
      }
    }
  },
  created() {
    this.goLogin()
  }
};
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 300px 30px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }
  &-text {
    font-size: 50px;
    line-height: 100px;
    color: #5C9CFF;
  }
}
</style>
